package com.zhx.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: user对象，实现Serizlizable,方便序列化
 * @author: zhx
 * @create: 2021-03-22 20:06
 **/
public class User implements Serializable{
    private int userId;
    private String userName;
    private String passWord;
    private int credits; //积分
    private String lastIp; //最后一次登陆的ip地址
    private String lastvisit; //最后一次登陆的时间
    private String registerTime; //注册时间

    public User() {
    }

    public User(int userId, String userName, String passWord, int credits, String lastIp, String lastvisit,String registerTime) {
        this.userId = userId;
        this.userName = userName;
        this.passWord = passWord;
        this.credits = credits;
        this.lastIp = lastIp;
        this.lastvisit = lastvisit;
        this.registerTime=registerTime;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public int getCredits() {
        return credits;
    }

    public void setCredits(int credits) {
        this.credits = credits;
    }

    public String getLastIp() {
        return lastIp;
    }

    public void setLastIp(String lastIp) {
        this.lastIp = lastIp;
    }

    public String getLastvisit() {
        return lastvisit;
    }

    public void setLastvisit(String lastvisit) {
        this.lastvisit = lastvisit;
    }

    public String getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(String registerTime) {
        this.registerTime = registerTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", credits=" + credits +
                ", lastIp='" + lastIp + '\'' +
                ", lastvisit='" + lastvisit + '\'' +
                ", registerTime='" + registerTime + '\'' +
                '}';
    }
}
